<link href="__STATIC__/zui/lib/chosen/chosen.min.css" rel="stylesheet">
<link href="__STATIC__/zui/lib/chosenicons/zui.chosenicons.min.css" rel="stylesheet">
<form action="{$info['id'] == null?url('add'):url('edit')}" class="form-edit" method="post">
    <div class="row">

        <div class="col-md-6">
            <div class="form-group">
                <label class="required">菜单名称</label>
                <div>
                    <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
                </div>

            </div>
        </div>
        <div class="col-md-3">
            <div class="form-group">
                <label class="required">上级菜单</label>
                <div>
                    {html:select name="pid" options="menu_tree" selected="info['pid']" clazz="form-control"
                    first="顶级菜单"/}
                </div>

            </div>
        </div>
        <div class="col-md-3">
            <div class="form-group">
                <label class="required">所在模块</label>
                <div>
                    {html:select name="module" options="menu_module" selected="info['module']" clazz="form-control"/}
                </div>

            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="required">链接地址</label>
                <div>
                    <input type="text" class="form-control" name="url" value="{$info.url|default=''}">
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="">菜单图标</label>
                <div>
                    <select class="chosen-icons form-control" name="icon" id="chosenIcons" data-value="{$info.icon|default=''}"></select>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="required">排序</label>
                <div>
                    <input type="text" class="form-control" name="sort" value="{$info.sort|default='10'}">
                </div>

            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="required">是否菜单</label>
                <div>
                    {html:select name="is_menu" options="yes_no" selected="info['is_menu']" clazz="form-control"/}
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="required">开发模式</label>
                <div>
                    {html:select name="is_dev" options="yes_no" selected="info['is_dev']" clazz="form-control"/}
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="form-group">
                <label class="required">是否隐藏</label>
                <div>
                    {html:select name="hide" options="yes_no" selected="info['hide']" clazz="form-control"/}
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label>备注说明</label>
                <div>
                    <textarea name="remark" class="form-control" rows="2">{$info.remark|default=''}</textarea>
                </div>
            </div>

        </div>

    </div>
    <hr style="margin-top: 0; margin-bottom: 15px; margin-left: -15px; margin-right: -15px;"/>
    <div class="text-right">
        <input type="hidden" name="id" value="{$info.id|default=''}">

        <button type="button" class="btn btn-default" data-dismiss="modal">
            <i class="icon icon-times"></i> 关闭
        </button>
        <button class="btn btn-primary ajax-post" type="submit" data-href="form-edit">
            <i class="icon icon-save"></i> 保存
        </button>
    </div>
</form>
<script src="__STATIC__/zui/lib/chosen/chosen.min.js"></script>
<script src="__STATIC__/zui/lib/chosenicons/zui.chosenicons.js"></script>

<script>
    $(function () {
        $('select.chosen-icons').chosenIcons();
    });
</script>

